Optimal. Leaf size=138 \[ \frac{2 A \sqrt{\frac{a \cos (c+d x)+b}{a+b}} \text{EllipticF}\left (\frac{1}{2} (c+d x),\frac{2 a}{a+b}\right )}{d \sqrt{\cos (c+d x)} \sqrt{a+b \sec (c+d x)}}+\frac{2 B \sqrt{\frac{a \cos (c+d x)+b}{a+b}} \Pi \left (2;\frac{1}{2} (c+d x)|\frac{2 a}{a+b}\right )}{d \sqrt{\cos (c+d x)} \sqrt{a+b \sec (c+d x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.52561, antiderivative size = 138, normalized size of antiderivative = 1., number of steps used = 8, number of rules used = 8, integrand size = 35, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.229, Rules used = {2955, 4036, 3858, 2663, 2661, 3859, 2807, 2805} \[ \frac{2 A \sqrt{\frac{a \cos (c+d x)+b}{a+b}} F\left (\frac{1}{2} (c+d x)|\frac{2 a}{a+b}\right )}{d \sqrt{\cos (c+d x)} \sqrt{a+b \sec (c+d x)}}+\frac{2 B \sqrt{\frac{a \cos (c+d x)+b}{a+b}} \Pi \left (2;\frac{1}{2} (c+d x)|\frac{2 a}{a+b}\right )}{d \sqrt{\cos (c+d x)} \sqrt{a+b \sec (c+d x)}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2955
Rule 4036
Rule 3858
Rule 2663
Rule 2661
Rule 3859
Rule 2807
Rule 2805
Rubi steps
\begin{align*} \int \frac{A+B \sec (c+d x)}{\sqrt{\cos (c+d x)} \sqrt{a+b \sec (c+d x)}} \, dx &=\left (\sqrt{\cos (c+d x)} \sqrt{\sec (c+d x)}\right ) \int \frac{\sqrt{\sec (c+d x)} (A+B \sec (c+d x))}{\sqrt{a+b \sec (c+d x)}} \, dx\\ &=\left (A \sqrt{\cos (c+d x)} \sqrt{\sec (c+d x)}\right ) \int \frac{\sqrt{\sec (c+d x)}}{\sqrt{a+b \sec (c+d x)}} \, dx+\left (B \sqrt{\cos (c+d x)} \sqrt{\sec (c+d x)}\right ) \int \frac{\sec ^{\frac{3}{2}}(c+d x)}{\sqrt{a+b \sec (c+d x)}} \, dx\\ &=\frac{\left (A \sqrt{b+a \cos (c+d x)}\right ) \int \frac{1}{\sqrt{b+a \cos (c+d x)}} \, dx}{\sqrt{\cos (c+d x)} \sqrt{a+b \sec (c+d x)}}+\frac{\left (B \sqrt{b+a \cos (c+d x)}\right ) \int \frac{\sec (c+d x)}{\sqrt{b+a \cos (c+d x)}} \, dx}{\sqrt{\cos (c+d x)} \sqrt{a+b \sec (c+d x)}}\\ &=\frac{\left (A \sqrt{\frac{b+a \cos (c+d x)}{a+b}}\right ) \int \frac{1}{\sqrt{\frac{b}{a+b}+\frac{a \cos (c+d x)}{a+b}}} \, dx}{\sqrt{\cos (c+d x)} \sqrt{a+b \sec (c+d x)}}+\frac{\left (B \sqrt{\frac{b+a \cos (c+d x)}{a+b}}\right ) \int \frac{\sec (c+d x)}{\sqrt{\frac{b}{a+b}+\frac{a \cos (c+d x)}{a+b}}} \, dx}{\sqrt{\cos (c+d x)} \sqrt{a+b \sec (c+d x)}}\\ &=\frac{2 A \sqrt{\frac{b+a \cos (c+d x)}{a+b}} F\left (\frac{1}{2} (c+d x)|\frac{2 a}{a+b}\right )}{d \sqrt{\cos (c+d x)} \sqrt{a+b \sec (c+d x)}}+\frac{2 B \sqrt{\frac{b+a \cos (c+d x)}{a+b}} \Pi \left (2;\frac{1}{2} (c+d x)|\frac{2 a}{a+b}\right )}{d \sqrt{\cos (c+d x)} \sqrt{a+b \sec (c+d x)}}\\ \end{align*}
Mathematica [C] time = 28.3339, size = 16611, normalized size = 120.37 \[ \text{Result too large to show} \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [C] time = 0.361, size = 257, normalized size = 1.9 \begin{align*} -2\,{\frac{\sqrt{\cos \left ( dx+c \right ) }}{d \left ( b+a\cos \left ( dx+c \right ) \right ) \sqrt{ \left ( \cos \left ( dx+c \right ) +1 \right ) ^{-1}}} \left ( A{\it EllipticF} \left ({\frac{-1+\cos \left ( dx+c \right ) }{\sin \left ( dx+c \right ) }\sqrt{{\frac{a-b}{a+b}}}},\sqrt{-{\frac{a+b}{a-b}}} \right ) -B{\it EllipticF} \left ({\frac{-1+\cos \left ( dx+c \right ) }{\sin \left ( dx+c \right ) }\sqrt{{\frac{a-b}{a+b}}}},\sqrt{-{\frac{a+b}{a-b}}} \right ) +2\,B{\it EllipticPi} \left ({\frac{-1+\cos \left ( dx+c \right ) }{\sin \left ( dx+c \right ) }\sqrt{{\frac{a-b}{a+b}}}},{\frac{a+b}{a-b}},{i{\frac{1}{\sqrt{{\frac{a-b}{a+b}}}}}} \right ) \right ) \sqrt{{\frac{b+a\cos \left ( dx+c \right ) }{\cos \left ( dx+c \right ) }}}\sqrt{{\frac{b+a\cos \left ( dx+c \right ) }{ \left ( a+b \right ) \left ( \cos \left ( dx+c \right ) +1 \right ) }}}{\frac{1}{\sqrt{{\frac{a-b}{a+b}}}}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{B \sec \left (d x + c\right ) + A}{\sqrt{b \sec \left (d x + c\right ) + a} \sqrt{\cos \left (d x + c\right )}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{A + B \sec{\left (c + d x \right )}}{\sqrt{a + b \sec{\left (c + d x \right )}} \sqrt{\cos{\left (c + d x \right )}}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{B \sec \left (d x + c\right ) + A}{\sqrt{b \sec \left (d x + c\right ) + a} \sqrt{\cos \left (d x + c\right )}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]